1. Field of the Invention
The present invention generally relates to minimizing system freeze time during low memory relocation in a shared memory computer system. Specifically, a Low Memory Table keeps track of which memory pages are modified during a first copying phase prior to a system freeze, and during the system freeze only those modified pages are copied in a second copying phase.
2. Description of the Related Art
As shared memory computer systems become larger and larger, the scalability of the operating systems often lags behind. In order to make optimal use of these hardware systems for diverse workloads with varied resource requirements and protection domain requirements, logical partitioning, in which an instance of the operating system runs on only a portion of the physical resources of the system, becomes increasingly prevalent and desirable. FIG. 1 illustrates logical partitioning in a Symmetric Multi Processor (SMP) system 10 and a Non Uniform Memory Architecture (NUMA) system 20. The term “logical partitioning” means that the system is partitioned at logical boundaries instead of physical boundaries. Because the partitioning is done at logical boundaries, the configuration of each partition can be specified at a much finer granularity. For example, which partition each CPU belongs to can be specified, instead of which partition an entire set of CPUs on a single circuit board belongs to. Some situations where logical partitioning can be useful are:
1. An organization running a web hosting business can buy a single SMP or NUMA system, and logically partition it into several partitions, each partition hosting the web site of a different customer. The whole system can later be reconfigured into a different number of partitions depending on the number of customers it needs to serve.
2. An organization can use a simple SMP or NUMA system for development, testing, and production purposes by partitioning it into three partitions. The partitions can later be reconfigured with different sets of resources according to needs. However, the affected partitions have to be rebooted for the new configuration to take effect.
The workloads in the logical partitions often vary with time. So, it is very desirable to be able to move resources such as processors and memory from one logical partition to another without the need of a system reboot of any of the logical partitions involved. The capability to dynamically move memory among logical partitions requires the existence of methods and apparatus to relocate memory. The same methods and apparatus can also be used for concurrent hardware upgrade and maintenance.
Often times an operating system (OS), by its design, accesses certain sections of the system memory in address-translation-off mode. These memory sections are used, among other things, for processor interrupt management routines and related data structures. These memory sections are sometimes referred to as low memory or low core, and are often located in a contiguous range of physical memory addresses. The start and end of this address range are often identified by a pair of hardware registers inside each processor, which are referred to as low memory registers (LMR), as can be seen as items 17-x and 18-x of FIG. 2.
The relocation or migration of the low memory requires that all memory accesses to the low memory be blocked. Due to the nature of the data structures/functions residing in the low memory, blocking all accesses to it essentially boils down to freezing all the activities of the operating system. The process of low memory migration is explained in more detail shortly. Briefly, it involves the following steps, as discussed in more detail for the flowchart shown in FIG. 4:
1. Select a range of contiguous memory region to which the contents of the existing low memory will be migrated.
2. Quiesce the activities of the operating system (OS), also referred to as the start system freeze.
3. Copy the contents of all the low memory page frames to the target region.
4. Update the low memory registers of all the processors in the logical partition to point to the target region.
5. Resume the activities of the OS (also referred to as release the system freeze), so that the OS starts using the new memory region instead of the old one. The copying step (step 3 above) of low memory can often take some time, and since the OS cannot perform any useful services during this period, it is very important to keep this system freeze time to a minimum.
In view of the foregoing, there is currently a need for a way to reduce system freeze time during low memory relocation. Presently, no system is known that attempts to reduce system freeze time to a minimum.